import request from '@/utils/request'

// 查询资料列表
export function resourceList(query) {
  return request({
    url: '/study/resource/list',
    method: 'get',
    params: query
  })
}
// 新增资料
export function addresource(data) {
  return request({
    url: '/study/resource',
    method: 'post',
    data: data
  })
}


// 获取资料详细信息
export function resourceId(id) {
  return request({
    url: `/study/resource/${id}`,
    method: 'get',
  })
}


// 修改资料
export function eitHresource(data) {
  return request({
    url: '/study/resource',
    method: 'put',
    data: data
  })
}

// 删除资料
export function delresource(id) {
  return request({
    url: `/study/resource/${id}`,
    method: 'delete'
  })
}

// 导出品类列表
export function exporTresource(data) {
  return request({
    url: '/study/resource/export',
    method: 'post',
    data: data
  })
}

// 审核资料
export function resourceAudit(query) {
  return request({
    url: '/study/resource/audit',
    method: 'get',
    params: query
  })
}

// 发布资料
export function resourcePublish(query) {
  return request({
    url: '/study/resource/publish',
    method: 'get',
    params: query
  })
}

// 下架资料
export function notPublished(query) {
  return request({
    url: '/study/resource/not-published',
    method: 'get',
    params: query
  })
} 